<?php

namespace app\api\logic;


use app\common\logic\BaseLogic;
use app\common\service\WeChatService;

/**
 * 分享逻辑层
 * Class ShareLogic
 * @package app\shopapi\logic
 */
class ShareLogic extends BaseLogic
{
    /**
     * @notes 获取小程序码
     * @param $params
     * @return bool|mixed|string
     * @author ljj
     * @date 2023/2/28 5:09 下午
     */
    public function getMnpQrCode($params)
    {
        $data['page'] = $params['page'];
        if (isset($params['id']) && $params['id'] != '') {
            $data['scene'] = 'id='.$params['id'];
        }

        $result = WeChatService::makeMpQrCode($data,'base64');
        return $result;
    }
}